<?php
/*
 +----------------------------------------------------------------------
 | TEMMOKUMVC [ NO BEST, ONLY BETTER ]
 +----------------------------------------------------------------------
 | Copyright (c) 2018~2019 https://www.temmoku.cn All rights reserved.
 +----------------------------------------------------------------------
 | Author: 张宗强 Email:webmaster@temmoku.cn QQ:158726877 516669373 TEL:17895221001 微信:temmokumvc
 +---------------------------------------------------------------------- 
*/
namespace plugin\verification_code\public_class;
use temmoku\db;
use \plugin\verification_code\init;
class cache{
	public static function run($data=''){
		self::setting_cache();
	}
	//核心缓存
	public static function setting_cache(){
		$data=db::select('*')->from(init::$table."set")->query();
		
		$list=[];
		foreach($data AS $key=>$row){
			$list[$row['u_key']]=$row['u_value'];
		}
		$array=['verification_code'=>$list];
		createconf($array,'setting',init::$dir,true);
		
		
	}
}
?>